import pandas as pd
import cv2

for n in range(1, 63):  # 代表正数据集中开始和结束照片的数字
    path = r'C:\Users\Ke\PycharmProjects\pythonProject\mask\no_mask/' + str(n) + '.jpeg'
    # 读取图片
    img = cv2.imread(path)
    img = cv2.resize(img, (50, 50))  # 修改样本像素为20x20
    cv2.imwrite(r'C:\Users\Ke\PycharmProjects\pythonProject\mask\no_mask/' + str(n) + '.jpg', img)
    n += 1